import {defineStore} from 'pinia'

export const useTableColumnStore = defineStore('tableColumns', () => {
    const project = ref([
      {key: 0, label: `项目名称`, visible: true},
      {key: 1, label: `单位名称`, visible: true},
      {key: 2, label: `甲方对接人`, visible: true},
      {key: 3, label: `负责人`, visible: true},
      {key: 4, label: `成员`, visible: true},
      {key: 5, label: `制作人`, visible: true},
      {key: 6, label: `设计内容`, visible: true},
      {key: 7, label: `开始时间`, visible: true},
      {key: 8, label: `结束时间`, visible: true},
      {key: 9, label: `预计交稿时间`, visible: true},
      {key: 10, label: `项目进度`, visible: true},
      {key: 11, label: `任务进度`, visible: true},
      {key: 12, label: `备注`, visible: true},
    ])
    const projectTask = ref([
      {key: 0, label: "任务名称", visible: true},
      {key: 1, label: "负责人", visible: true},
      {key: 2, label: "任务内容", visible: true},
      {key: 3, label: "状态", visible: true},
      {key: 4, label: "分值", visible: true},
      {key: 5, label: "备注", visible: true},
    ])
    const projectFile = ref([
      {key: 0, label: "附件名称", visible: true},
      {key: 1, label: "文件大小", visible: true},
      {key: 2, label: "文件格式", visible: true},
      {key: 3, label: "上传人", visible: true},
      {key: 4, label: "上传时间", visible: true},
      {key: 5, label: "备注", visible: true},
    ])
    const Material = ref([
      {key: 0, label: "商品名称", visible: true},
      {key: 1, label: "图片", visible: true},
      {key: 2, label: "数量", visible: true},
      {key: 3, label: "单位", visible: true},
      {key: 4, label: "备注", visible: true},
      {key: 5, label: "其他", visible: true},
    ])

    return {
      project,
      projectTask,
      projectFile,
      Material
    }
  },
  { // 第三个参数：配置项（包含 persist）
    persist: true // 基础配置：启用持久化（默认存储到 localStorage）
  })
